from flask import flash

from app.bot.services.loggers import logger
from app.bot.services.ssh_connector import get_proxies_from_config
from app.database.enums import ServerPrivacy, ServerType
from app.database.models import Proxy
from app.server.flask_app import db
from app.server.flask_app.admin_views import MyBaseModelView


class VPNServerModelView(MyBaseModelView):
    column_list = (
        "id",
        "status",
        "name",
        "ip_address",
        "ssh_port",
        "login",
        "password",
        "was_added",
    )
    column_filters = (
        "name",
        "status",
        "was_added",
    )
    column_searchable_list = (
        "ip_address",
        "name",
        "ssh_port",
        "login",
        "password",
        "status",
    )
